3.143 \(\int \frac{\sqrt{a+a \sec (e+f x)}}{c+c \sec (e+f x)} \, dx\)

Optimal. Leaf size=91 \[ \frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{c f}-\frac{\sqrt{2} \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{c f} \]

[Out]

(2*Sqrt[a]*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/(c*f) - (Sqrt[2]*Sqrt[a]*ArcTan[(Sqrt[a]*T
an[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])])/(c*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0824256, antiderivative size = 91, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.185, Rules used = {21, 3776, 3774, 203, 3795} \[ \frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{c f}-\frac{\sqrt{2} \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{c f} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Sec[e + f*x]]/(c + c*Sec[e + f*x]),x]

[Out]

(2*Sqrt[a]*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/(c*f) - (Sqrt[2]*Sqrt[a]*ArcTan[(Sqrt[a]*T
an[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])])/(c*f)

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 3776

Int[1/Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[1/a, Int[Sqrt[a + b*Csc[c + d*x]], x], x]
- Dist[b/a, Int[Csc[c + d*x]/Sqrt[a + b*Csc[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 3774

Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[(-2*b)/d, Subst[Int[1/(a + x^2), x], x, (b*C
ot[c + d*x])/Sqrt[a + b*Csc[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 3795

Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2/f, Subst[Int[1/(2
*a + x^2), x], x, (b*Cot[e + f*x])/Sqrt[a + b*Csc[e + f*x]]], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0
]

Rubi steps

\begin{align*} \int \frac{\sqrt{a+a \sec (e+f x)}}{c+c \sec (e+f x)} \, dx &=\frac{a \int \frac{1}{\sqrt{a+a \sec (e+f x)}} \, dx}{c}\\ &=\frac{\int \sqrt{a+a \sec (e+f x)} \, dx}{c}-\frac{a \int \frac{\sec (e+f x)}{\sqrt{a+a \sec (e+f x)}} \, dx}{c}\\ &=-\frac{(2 a) \operatorname{Subst}\left (\int \frac{1}{a+x^2} \, dx,x,-\frac{a \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{c f}+\frac{(2 a) \operatorname{Subst}\left (\int \frac{1}{2 a+x^2} \, dx,x,-\frac{a \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{c f}\\ &=\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{c f}-\frac{\sqrt{2} \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a+a \sec (e+f x)}}\right )}{c f}\\ \end{align*}

Mathematica [C]  time = 0.706105, size = 133, normalized size = 1.46 \[ -\frac{i \sqrt{1+e^{2 i (e+f x)}} \sqrt{a (\sec (e+f x)+1)} \left (\sinh ^{-1}\left (e^{i (e+f x)}\right )-\sqrt{2} \tanh ^{-1}\left (\frac{-1+e^{i (e+f x)}}{\sqrt{2} \sqrt{1+e^{2 i (e+f x)}}}\right )-\tanh ^{-1}\left (\sqrt{1+e^{2 i (e+f x)}}\right )\right )}{c f \left (1+e^{i (e+f x)}\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Sec[e + f*x]]/(c + c*Sec[e + f*x]),x]

[Out]

((-I)*Sqrt[1 + E^((2*I)*(e + f*x))]*(ArcSinh[E^(I*(e + f*x))] - Sqrt[2]*ArcTanh[(-1 + E^(I*(e + f*x)))/(Sqrt[2
]*Sqrt[1 + E^((2*I)*(e + f*x))])] - ArcTanh[Sqrt[1 + E^((2*I)*(e + f*x))]])*Sqrt[a*(1 + Sec[e + f*x])])/(c*(1
+ E^(I*(e + f*x)))*f)

________________________________________________________________________________________

Maple [A]  time = 0.227, size = 141, normalized size = 1.6 \begin{align*} -{\frac{1}{fc}\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}}\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}} \left ( \sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}\sin \left ( fx+e \right ) }{2\,\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) +\ln \left ( -{\frac{1}{\sin \left ( fx+e \right ) } \left ( -\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) +\cos \left ( fx+e \right ) -1 \right ) } \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sec(f*x+e))^(1/2)/(c+c*sec(f*x+e)),x)

[Out]

-1/c/f*(1/cos(f*x+e)*a*(1+cos(f*x+e)))^(1/2)*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*(2^(1/2)*arctanh(1/2*2^(1/2)
*(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*x+e)/cos(f*x+e))+ln(-(-(-2*cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*sin(f*
x+e)+cos(f*x+e)-1)/sin(f*x+e)))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a \sec \left (f x + e\right ) + a}}{c \sec \left (f x + e\right ) + c}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(1/2)/(c+c*sec(f*x+e)),x, algorithm="maxima")

[Out]

integrate(sqrt(a*sec(f*x + e) + a)/(c*sec(f*x + e) + c), x)

________________________________________________________________________________________

Fricas [A]  time = 1.58395, size = 782, normalized size = 8.59 \begin{align*} \left [\frac{\sqrt{2} \sqrt{-a} \log \left (\frac{2 \, \sqrt{2} \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, a \cos \left (f x + e\right )^{2} + 2 \, a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) + 2 \, \sqrt{-a} \log \left (\frac{2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right )}{2 \, c f}, \frac{\sqrt{2} \sqrt{a} \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right ) - 2 \, \sqrt{a} \arctan \left (\frac{\sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right )}{c f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(1/2)/(c+c*sec(f*x+e)),x, algorithm="fricas")

[Out]

[1/2*(sqrt(2)*sqrt(-a)*log((2*sqrt(2)*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x +
e) + 3*a*cos(f*x + e)^2 + 2*a*cos(f*x + e) - a)/(cos(f*x + e)^2 + 2*cos(f*x + e) + 1)) + 2*sqrt(-a)*log((2*a*c
os(f*x + e)^2 - 2*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e)
- a)/(cos(f*x + e) + 1)))/(c*f), (sqrt(2)*sqrt(a)*arctan(sqrt(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f
*x + e)/(sqrt(a)*sin(f*x + e))) - 2*sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(
a)*sin(f*x + e))))/(c*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\sqrt{a \sec{\left (e + f x \right )} + a}}{\sec{\left (e + f x \right )} + 1}\, dx}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))**(1/2)/(c+c*sec(f*x+e)),x)

[Out]

Integral(sqrt(a*sec(e + f*x) + a)/(sec(e + f*x) + 1), x)/c

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(1/2)/(c+c*sec(f*x+e)),x, algorithm="giac")

[Out]

Timed out